<?php
while ($dRow = mysql_fetch_array($cDreapta)){
    //search
    if ($dRow['m_id'] == '5')
        include DIR_MODULES . 'search/index.php';
    //news
    elseif ($dRow['m_id'] == '4'){
        if ($_GET['pg'] == 'offers')
            include DIR_MODULES . 'news/c_dreapta.php';
        elseif ($_GET['pg'] == 'pages')
            include DIR_MODULES . 'news/c_dreapta_pages.php';
        else
            include DIR_MODULES . 'news/index.php';
    }
    //multimedia (player video sau galerie)
    if ($dRow['type'] == 'mmgallery' || $dRow['type'] == 'mmvideo')
        include DIR_MODULES . 'multimedia/index.php';
    //newsletter
    elseif ($dRow['m_id'] == '6')
        include DIR_MODULES . 'newsletter/index.php';
    //plata in rate
    elseif ($dRow['m_id'] == '7')
        include DIR_MODULES . 'plata_in_rate/index.php';
    //modul top
    if ($dRow['type'] == 'top')
        include DIR_MODULES . 'top5/index.php';
    //modul oferte speciale
    if ($dRow['type'] == 'ofertespeciale') {
    	if (strpos($_SERVER['REQUEST_URI'], "/index.html") || $_GET['pg'] == ''){
    		include DIR_MODULES . 'oferte_speciale/c_dreapta_home.php';
    	} elseif ($_GET['pg'] == 'pages') {
    		 include DIR_MODULES . 'oferte_speciale/c_dreapta_pages.php';
		} elseif ($_GET['pg'] == 'tops') {
    		 include DIR_MODULES . 'oferte_speciale/c_dreapta_pages.php';
    	} elseif ($_GET['pg'] == 'contact') {
    		include DIR_MODULES . 'oferte_speciale/c_dreapta_home.php';
    	} else {
        	include DIR_MODULES . 'oferte_speciale/index.php';
    	}
    }
    if ($dRow['type'] == 'issuu')
        include DIR_MODULES . 'issuu/index.php';
}
?>